package com.examination.system.administration.response;

import com.examination.framework.model.response.ResultCode;
import io.swagger.annotations.ApiModelProperty;
import lombok.ToString;

/**
 * @author 寇淇芮
 * @Date 2019/8/24 22:03
 */
@ToString
public enum  NationCode implements ResultCode {
    WITHSEVERALEXCEPTIONS(false,10001,"掺数有异常请核实接口掺数"),
    OCCUPATIONNATIONNAME(false,10002,"民族名称已有无需添加"),
    NATIONBYNAMENULL(false,10003 ,"民族名称不能为空或者为空白字符" ),
    NATIONBYIDNULL(false,10004,"民族id不能为空白字符或者为空"),
    DATADOESNOTEXIST(false,10005,"数据不存在请联系管理员"),
    SUCCESS(true,12001,"操作成功"),
    FAIL(false,12001,"操作失败")  ;
    @ApiModelProperty(value = "操作是否成功", example = "true", required = true)
    private Boolean success;
    @ApiModelProperty(value = "操作代码", example = "true", required = true)
    private int code;
    @ApiModelProperty(value = "操作信息", example = "true", required = true)
    private String message;

    private NationCode(Boolean success,int code,String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }
    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }

    }
